function beforeRegister({
	userRecord,
	clientInfo
} = {}) {
	// 工人端注册
	if (clientInfo.appId === '__UNI__DE79000') {
		if (userRecord.role) {
			userRecord.role.push('worker')
		} else {
			userRecord.role = ["worker"]
		}
	}
	// 工头端注册
	if (clientInfo.appId === '__UNI__AA191C4') {
		if (userRecord.role) {
			userRecord.role.push('overseer')
		} else {
			userRecord.role = ["overseer"]
		}
	}
	return userRecord // 务必返回处理后的userRecord
}

module.exports = {
	beforeRegister
}